package com.budwk.app.oss.services;

import com.budwk.app.oss.models.SysOss;
import com.budwk.starter.common.page.Pagination;
import com.budwk.starter.database.service.BaseService;
import org.nutz.dao.Condition;
import org.nutz.mvc.upload.TempFile;

import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
import java.util.List;

public interface SysOssService extends BaseService<SysOss>{

    Pagination queryPageList(int pageNumber, int pageSize, Condition cnd);

    List<SysOss> listByIds(Collection<Long> ossIds);

    SysOss getById(Long ossId);

    SysOss upload(TempFile file);

    List<SysOss> uploads(List<TempFile> files);

    SysOss upload(File file);

    void download(Long ossId, HttpServletResponse response) throws IOException;

    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
}
